package com.utils.bean;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 
 * @TableName safety
 */
@TableName(value ="safety")
@Data
@NoArgsConstructor
public class Safety implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 账户
     */
    @NotNull(message = "账号不能为空")
    @ApiModelProperty("账号")
    private String accountname;

    /**
     * 密码
     */
    @ApiModelProperty("密码")
    @NotNull(message = "密码不能为空")
    private String password;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Safety(String username, String password) {
        this.accountname = username;
        this.password = password;
    }
}